<ul class='navbar-nav mr-auto'>
  <li class='nav-item'><a class='nav-link' href='/'></a></li>
  @auth
    <li @if (Request::is('admin/post')) class='nav-item active' @else class='nav-item' @endif >
      <a class='nav-link' href='/admin/post'>文章</a>
    </li>
    <li @if (Request::is('admin/tag*')) class='nav-item active' @else class='nav-item' @endif>
      <a class='nav-link' href='/admin/tag'>标签</a>
    </li>
    <li @if (Request::is('admin/upload*')) class='nav-item active' @else class='nav-item' @endif>
      <a class='nav-link' href='/admin/upload'>上传</a>
    </li>
  @endauth
</ul>

<ul class='navbar-nav ml-auto'>
  @guest
    <li class='nav-item'><a class='nav-link' href='/login'>登录</a></li>
  @else
    <li class='nav-item dropdown'>
      <a class='nav-link dropdown-toggle'
        data-toggle='dropdown'
        role='button'
        aria-expanded='false'
        href='#'>
        {{ Auth::user()->name }}
        <span class='carset'></span>
      </a>
      <div class='dropdown-menu' role='menu'>
        <a class='dropdown-item' href='/logout'>退出</a>
      </div>
    </li>
  @endguest
</ul>